Skip to main content

HTML Validator

HTML Validator helps you find errors when you open or edit an HTML file. E.g. duplicate IDs, unrecognized tags, Etc. The validator works on HTML and related files like XHTML and HTM. Fragments ofHTML inside PHP, JSP and ASP files are also supported.

HTML validate

Advanced Use Cases

HTML Validator is based on the powerful HTML-validate library. You can customize the behavior by using a .htmlvalidate.json configuration file. See this link to understand how to write custom config files and supported options.

Example .htmlvalidate.json config file for stricter HTML validation.

Create a new file with name .htmlvalidate.json in your project and add the following text:

{
"extends": ["html-validate:recommended"]
}

Read more on supported configurations

FAQ

Q: Why is my HTML Validator custom configuration not working?

Phoenix Code only supports plain JSON configuration file .htmlvalidate.json. Other config files like .htmlvalidate.js and .htmlvalidate.cjs are not supported.